<article class="" id="post-">
<header class="entry-header">
<h1 class="entry-title">event.isImmediatePropagationStopped()</h1>
<div class="entry-meta">
						所属分类：<span class="category"><a href="/category/events/">事件</a> &gt; <a href="/category/events/event-object/">事件对象</a></span>
<span class="pull-right">英文文档：<a href="https://api.jquery123.com/event.isImmediatePropagationStopped/" target="_blank">event.isImmediatePropagationStopped()</a></span>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<!-- .entry-header -->
<div class="entry-content">
<article class="entry method" id="event-isImmediatePropagationStopped1"><h2 class="section-title">
<span class="name">event.isImmediatePropagationStopped()</span><span class="returns">返回: <a href="/Types/#Boolean">Boolean</a></span>
</h2>
<div class="entry-wrapper">
<p class="desc"><strong>描述: </strong>
			
			                        根据事件对象中是否调用过 <a href="/event.stopImmediatePropagation">event.stopImmediatePropagation()</a>
			                        方法,来返回一个布尔值。 </p>
<ul class="signatures">
<li class="signature" id="event-isImmediatePropagationStopped">
<h4 class="name">
<span class="version-details">添加的版本: <a href="/category/version/1.3/">1.3</a></span>event.isImmediatePropagationStopped()
			                            </h4>
<ul>
<li>
<div class="null-signature">这个方法不接受任何参数。</div>
</li>
</ul>
</li>
</ul>
<div class="longdesc" id="entry-longdesc">
<p>这属性介绍，查看<a href="http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/events.html#Events-Event-isImmediatePropagationStopped">DOM
			                            level 3</a>.</p>
</div>
<section class="entry-examples" id="entry-examples">
<header><h2 class="underline">例子:</h2></header>
<div class="entry-example" id="example-0">
<h4><span class="desc">检测 event.stopImmediatePropagation() 是否被调用过。</span></h4>
<div class="syntaxhighlighter xml ">
<table>
<tbody>
<tr>
<td class="gutter">
<div class="line n1">1</div>
<div class="line n2">2</div>
<div class="line n3">3</div>
<div class="line n4">4</div>
<div class="line n5">5</div>
<div class="line n6">6</div>
<div class="line n7">7</div>
<div class="line n8">8</div>
<div class="line n9">9</div>
<div class="line n10">10</div>
<div class="line n11">11</div>
<div class="line n12">12</div>
<div class="line n13">13</div>
<div class="line n14">14</div>
<div class="line n15">15</div>
<div class="line n16">16</div>
<div class="line n17">17</div>
<div class="line n18">18</div>
<div class="line n19">19</div>
<div class="line n20">20</div>
<div class="line n21">21</div>
<div class="line n22">22</div>
<div class="line n23">23</div>
<div class="line n24">24</div>
<div class="line n25">25</div>
<div class="line n26">26</div>
<div class="line n27">27</div>
<div class="line n28">28</div>
<div class="line n29">29</div>
<div class="line n30">30</div>
<div class="line n31">31</div>
</td>
<td class="code">
<pre><div class="container"><div class="line"><code><span class="doctype">&lt;!DOCTYPE html&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;<span class="title">html</span>&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;<span class="title">head</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">script</span> <span class="attribute">src</span>=<span class="value">"https://code.jquery.com/jquery-1.9.1.js"</span>&gt;</span><span class="javascript"></span><span class="tag">&lt;/<span class="title">script</span>&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;/<span class="title">head</span>&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;<span class="title">body</span>&gt;</span></code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">button</span>&gt;</span>click me<span class="tag">&lt;/<span class="title">button</span>&gt;</span></code></div></div><div class="container"><div class="line"><code>  <span class="tag">&lt;<span class="title">div</span> <span class="attribute">id</span>=<span class="value">"stop-log"</span>&gt;</span><span class="tag">&lt;/<span class="title">div</span>&gt;</span></code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;<span class="title">script</span>&gt;</span><span class="javascript"></span></code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="function"><span class="keyword">function</span> <span class="title">immediatePropStopped</span><span class="params">(e)</span> {</span></code></div></div><div class="container"><div class="line"><code>  <span class="keyword">var</span> msg = <span class="string">""</span>;</code></div></div><div class="container"><div class="line"><code>  <span class="keyword">if</span> ( e.isImmediatePropagationStopped() ) {</code></div></div><div class="container"><div class="line"><code>    msg =  <span class="string">"called"</span></code></div></div><div class="container"><div class="line"><code>  } <span class="keyword">else</span> {</code></div></div><div class="container"><div class="line"><code>    msg = <span class="string">"not called"</span>;</code></div></div><div class="container"><div class="line"><code>  }</code></div></div><div class="container"><div class="line"><code>  $(<span class="string">"#stop-log"</span>).append( <span class="string">"&lt;div&gt;"</span> + msg + <span class="string">"&lt;/div&gt;"</span> );</code></div></div><div class="container"><div class="line"><code>}</code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code>$(<span class="string">"button"</span>).click(<span class="keyword">function</span>(event) {</code></div></div><div class="container"><div class="line"><code>  immediatePropStopped(event);</code></div></div><div class="container"><div class="line"><code>  event.stopImmediatePropagation();</code></div></div><div class="container"><div class="line"><code>  immediatePropStopped(event);</code></div></div><div class="container"><div class="line"><code>});</code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;/<span class="title">script</span>&gt;</span></code></div></div><div class="container"><div class="line"><code> </code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;/<span class="title">body</span>&gt;</span></code></div></div><div class="container"><div class="line"><code><span class="tag">&lt;/<span class="title">html</span>&gt;</span></code></div></div></pre>
</td>
</tr>
</tbody>
</table>
</div>
<h4>Demo:</h4>
<div class="demo code-demo"></div>
</div>
</section>
</div>
</article>
</div>
</article>